﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using MaxAlarm.ViewModels;

namespace MaxAlarm.Pages
{
    /// <summary>
    /// Interaction logic for SettingsPage.xaml
    /// </summary>
    public partial class SettingsPage : Page
    {
        public static readonly DependencyProperty ViewModelProperty =
            DependencyProperty.RegisterAttached("ViewModel", typeof (SettingsPageViewModel), typeof (SettingsPage),
                                                               new PropertyMetadata(null, PropertyChangedCallback));

        private static void PropertyChangedCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            
        }

        public static void SetViewModel(UIElement element, SettingsPageViewModel value)
        {
            element.SetValue(ViewModelProperty, value);
        }

        public static SettingsPageViewModel GetViewModel(UIElement element)
        {
            return (SettingsPageViewModel) element.GetValue(ViewModelProperty);
        }

        public SettingsPageViewModel ViewModel
        {
            get { return (SettingsPageViewModel) GetValue(ViewModelProperty); }
        }

        public SettingsPage()
        {
            //ViewModel = new SettingsPageViewModel();
            InitializeComponent();
        }
    }
}
